<div class="content1" href="">
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <title>退货/提前结清页面</title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/base.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
    <link href="css/layer.css" rel="stylesheet">
    <link href="css/pagination.css" rel="stylesheet">
    <link href="css/bootstrap-datetimepicker.css" rel="stylesheet">
    <link href="css/dataTables.bootstrap.min.css" rel="stylesheet">
    <link href="css/jedate.css" rel="stylesheet">
    <style>
        #loanDetail{
            background-color: #fff;
            margin-bottom: 15px;
        }
        #loanDetail p{
            padding-left:0 ;
            padding-right: 0;
            margin: 6px 0 ;
        }
        #loanDetail .wd_60{
            display: inline-block;
            width: 102px;
            text-align: right;
            font-size: 12px;
            font-family: "微软雅黑";
        }
        #loanDetail .c13 .wd_60{
            float: left;
            margin-top: 5px;
        }
        #loanDetail .c13 input{
            float: left;
            font-size: 12px;
            font-family: "微软雅黑";
        }
        #loanDetail .col-lg-3 ,#loanDetail .c13{
            margin:5px 0;
            padding-left:5px;
            padding-right: 5px;
        }

        #loanDetail select option{
            font-size: 12px;
            font-family: "微软雅黑";
        }
        .search_btn {
            font-size: 12px;
            background-color: #09C;
            padding: 5px 16px;
            margin-top: 3px;
            margin-bottom: 5px;
        }
        .ta_r{
            text-align: right;
        }
        .mr_25{
            margin-right: 25px;
        }
        .cardSelect{
            border: 1px solid #ddd;
            height: 25px;
            width: 150px;
            font-size: 12px;
        }
    </style>

<div class="hui"><img src="images/ajax-loader.gif"></div>
<div class="content">
    <!--面包屑导航start-->
    <ol class="breadcrumb">
        <li class="active">退货/提前结清查询</li>
    </ol>
    <div id="loanDetail" class="col-lg-12 col-md-12 col-sm-12">
        <div class="col-lg-3 col-md-3 col-sm-3"><span class="wd_60">姓名&nbsp;&nbsp;</span><input type="text" id="hdCustInfoName"></div>
        <div class="col-lg-3 col-md-3 col-sm-3"><span class="wd_60">身份证号&nbsp;&nbsp;</span><input type="text" id="hdCustInfoId"></div>
        <div class="col-lg-3 col-md-3 col-sm-3 c13"><span class="wd_60">结清/退货日期&nbsp;&nbsp;</span><input type="text" id="refundDate" value="" placeholder="请选择时间" readonly=""></div>
        <div class="col-lg-3 col-md-3 col-sm-3"><span class="wd_60">资方&nbsp;&nbsp;</span><select id="capitalId"><option value="">请选择</option><option value="1">北银</option><option value="14">91金融</option><option value="13">沃付分期</option><option value="22">医美</option><option value="30">苏宁</option><option value="100">mini循环贷</option><option value="3">海尔教育</option><option value="4">安信小贷</option><option value="5">百度</option><option value="7">海尔租房</option><option value="8">华融</option><option value="11">贷鱼教育</option><option value="15">湖北消费金融</option><option value="16">91旺财</option><option value="18">晋商租房</option><option value="17">晋商教育</option></select></div>
        <div class="col-lg-3 col-md-3 col-sm-3"><span class="wd_60">商户&nbsp;&nbsp;</span><input type="text" id="bizName"></div>
        <div class="col-lg-3 col-md-3 col-sm-3"><span class="wd_60">类型&nbsp;&nbsp;</span>
            <select id="settleType" style="margin-left: -4px">
                <option value="" selected="">全部</option>
                <option value="1">退货</option>
                <option value="2">提前结清</option>
            </select>
        </div>
        <div class="col-lg-3 col-md-3 col-sm-3"><span class="wd_60">状态&nbsp;&nbsp;</span>
            <select id="status" style="margin-left: -4px">
                <option value="" selected="">全部</option>
                <option value="1">处理中</option>
                <option value="2">已处理</option>
            </select>
        </div>
        <div class="col-lg-3 col-md-3 col-sm-3">

        </div>
        <div class="col-lg-3 col-md-3 col-sm-3 ta_r">
            <button class="btn btn-primary btn-sm search_btn" type="button" id="btn-search">查询</button>
             &nbsp;&nbsp;&nbsp;&nbsp;
             <button class="btn btn-primary btn-sm search_btn mr_25" type="button" id="btn-export" onclick="exportResult();">导出</button>
        </div>
        <div class="clear"></div>
    </div>
    <div class="table-responsive">
        <div id="lendingList_wrapper" class="dataTables_wrapper form-inline dt-bootstrap no-footer"><div class="top"><div class="clear"></div></div><div id="lendingList_processing" class="dataTables_processing panel panel-default" style="display: none;">处理中...</div><table id="lendingList" style="width: 100%;" class="table table-bordered table-striped table-hover bg_wt dataTable no-footer" role="grid" aria-describedby="lendingList_info">
            <thead style="border-bottom: 0;background-color: #fff;">
            <tr role="row"><th class="text-center fs_13 sorting_disabled" rowspan="1" colspan="1" style="width: 54px;">资金方</th><th class="text-center fs_13 sorting_disabled" rowspan="1" colspan="1" style="width: 187px;">商户名称</th><th class="text-center fs_13 sorting_disabled" rowspan="1" colspan="1" style="width: 55px;">客户姓名</th><th class="text-center fs_13 sorting_disabled" rowspan="1" colspan="1" style="width: 142px;">证件号</th><th class="text-center fs_13 sorting_disabled" rowspan="1" colspan="1" style="width: 55px;">贷款金额</th><th class="text-center fs_13 sorting_disabled" rowspan="1" colspan="1" style="width: 68px;">资方贴息率</th><th class="text-center fs_13 sorting_disabled" rowspan="1" colspan="1" style="width: 68px;">商户贴息率</th><th class="text-center fs_13 sorting_disabled" rowspan="1" colspan="1" style="width: 55px;">平台应收</th><th class="text-center fs_13 sorting_disabled" rowspan="1" colspan="1" style="width: 55px;">资方应收</th><th class="text-center fs_13 sorting_disabled" rowspan="1" colspan="1" style="width: 28px;">类型</th><th class="text-center fs_13 sorting_disabled" rowspan="1" colspan="1" style="width: 42px;">状态</th><th class="text-center fs_13 sorting_disabled" rowspan="1" colspan="1" style="width: 76px;">申请日期</th><th class="text-center  sorting_disabled" rowspan="1" colspan="1" style="width: 54px;">操作</th></tr>
            </thead>
        <tbody><tr role="row" class="odd"><td>沃付分期</td><td>广东明世教育集团有限公司</td><td>余文琳</td><td>330802199809185024</td><td>5980</td><td>0.07</td><td>0.07</td><td>136.87</td><td></td><td>退货</td><td>已处理</td><td>2019-05-17</td><td><button type="button" name="detail" id="detail" data-hdloaninfoid="6467438016217482241" data-settletype="1" class="btn btn-primary btn-sm " style="margin-bottom: 5px">明细</button></td></tr><tr role="row" class="even"><td>沃付分期</td><td>广东明世在线教育科技有限公司</td><td>冯兰芳</td><td>622621198910212183</td><td>6384</td><td>0.07</td><td>0.07</td><td>277.68</td><td></td><td>退货</td><td>已处理</td><td>2019-05-17</td><td><button type="button" name="detail" id="detail" data-hdloaninfoid="6475314109663413249" data-settletype="1" class="btn btn-primary btn-sm " style="margin-bottom: 5px">明细</button></td></tr><tr role="row" class="odd"><td>沃付分期</td><td>广东明世在线教育科技有限公司</td><td>张彬</td><td>341622199809161337</td><td>11520</td><td>0.07</td><td>0.07</td><td>1043.36</td><td></td><td>退货</td><td>已处理</td><td>2019-05-17</td><td><button type="button" name="detail" id="detail" data-hdloaninfoid="6469458982418252801" data-settletype="1" class="btn btn-primary btn-sm " style="margin-bottom: 5px">明细</button></td></tr><tr role="row" class="even"><td>晋商教育</td><td>深圳市神州通联科技有限公司</td><td>吴亮</td><td>420822199608125516</td><td>22800</td><td>0</td><td>0</td><td>23256</td><td></td><td>退货</td><td>已处理</td><td>2019-05-17</td><td><button type="button" name="detail" id="detail" data-hdloaninfoid="6526290752991921153" data-settletype="1" class="btn btn-primary btn-sm " style="margin-bottom: 5px">明细</button></td></tr><tr role="row" class="odd"><td>晋商教育</td><td>深圳市神州通联科技有限公司</td><td>韩超</td><td>420801199710224033</td><td>22800</td><td>0</td><td>0</td><td>23256</td><td></td><td>退货</td><td>已处理</td><td>2019-05-17</td><td><button type="button" name="detail" id="detail" data-hdloaninfoid="6526290802473174017" data-settletype="1" class="btn btn-primary btn-sm " style="margin-bottom: 5px">明细</button></td></tr><tr role="row" class="even"><td>晋商教育</td><td>深圳市宝安区卓文教育培训中心</td><td>余方田</td><td>522726199908122814</td><td>14800</td><td>0</td><td>0</td><td>14800</td><td></td><td>退货</td><td>已处理</td><td>2019-05-17</td><td><button type="button" name="detail" id="detail" data-hdloaninfoid="6532885470718723073" data-settletype="1" class="btn btn-primary btn-sm " style="margin-bottom: 5px">明细</button></td></tr><tr role="row" class="odd"><td>沃付分期</td><td>广东明世教育集团有限公司</td><td>江声</td><td>452402199702022118</td><td>5742</td><td>0.07</td><td>0.07</td><td>156.94</td><td></td><td>退货</td><td>已处理</td><td>2019-05-17</td><td><button type="button" name="detail" id="detail" data-hdloaninfoid="6494912249599099905" data-settletype="1" class="btn btn-primary btn-sm " style="margin-bottom: 5px">明细</button></td></tr><tr role="row" class="even"><td>晋商教育</td><td>广东明世在线教育科技有限公司</td><td>林冬彪</td><td>445224198412190678</td><td>7980</td><td>0.07</td><td>0.06</td><td>7534.45</td><td></td><td>退货</td><td>已处理</td><td>2019-05-17</td><td><button type="button" name="detail" id="detail" data-hdloaninfoid="6517750990667514881" data-settletype="1" class="btn btn-primary btn-sm " style="margin-bottom: 5px">明细</button></td></tr><tr role="row" class="odd"><td>晋商教育</td><td>广东明世在线教育科技有限公司</td><td>赖小明</td><td>360721199408120114</td><td>7182</td><td>0.07</td><td>0.06</td><td>6781</td><td></td><td>退货</td><td>已处理</td><td>2019-05-17</td><td><button type="button" name="detail" id="detail" data-hdloaninfoid="6520991313835328513" data-settletype="1" class="btn btn-primary btn-sm " style="margin-bottom: 5px">明细</button></td></tr><tr role="row" class="even"><td>晋商教育</td><td>深圳市宝安区卓文教育培训中心</td><td>淡朋飞</td><td>610481199210294217</td><td>14800</td><td>0</td><td>0</td><td>14800</td><td></td><td>退货</td><td>已处理</td><td>2019-05-15</td><td><button type="button" name="detail" id="detail" data-hdloaninfoid="6533879982829077505" data-settletype="1" class="btn btn-primary btn-sm " style="margin-bottom: 5px">明细</button></td></tr></tbody></table><div class="bottom"><div class="dataTables_info" id="lendingList_info" role="status" aria-live="polite">显示第 1 - 10 条记录，共147 条</div><div class="dataTables_length" id="lendingList_length"><label> <select name="lendingList_length" aria-controls="lendingList" class="form-control input-sm"><option value="10">10</option><option value="25">25</option><option value="50">50</option><option value="100">100</option></select> </label></div><div class="dataTables_paginate paging_full_numbers" id="lendingList_paginate"><ul class="pagination"><li class="paginate_button first disabled" id="lendingList_first"><a href="javascript:void(0);" aria-controls="lendingList" data-dt-idx="0" tabindex="0">首页</a></li><li class="paginate_button previous disabled" id="lendingList_previous"><a href="javascript:void(0);" aria-controls="lendingList" data-dt-idx="1" tabindex="0">上页</a></li><li class="paginate_button active"><a href="javascript:void(0);" aria-controls="lendingList" data-dt-idx="2" tabindex="0">1</a></li><li class="paginate_button "><a href="javascript:void(0);" aria-controls="lendingList" data-dt-idx="3" tabindex="0">2</a></li><li class="paginate_button "><a href="javascript:void(0);" aria-controls="lendingList" data-dt-idx="4" tabindex="0">3</a></li><li class="paginate_button "><a href="javascript:void(0);" aria-controls="lendingList" data-dt-idx="5" tabindex="0">4</a></li><li class="paginate_button "><a href="javascript:void(0);" aria-controls="lendingList" data-dt-idx="6" tabindex="0">5</a></li><li class="paginate_button disabled" id="lendingList_ellipsis"><a href="javascript:void(0);" aria-controls="lendingList" data-dt-idx="7" tabindex="0">…</a></li><li class="paginate_button "><a href="javascript:void(0);" aria-controls="lendingList" data-dt-idx="8" tabindex="0">15</a></li><li class="paginate_button next" id="lendingList_next"><a href="javascript:void(0);" aria-controls="lendingList" data-dt-idx="9" tabindex="0">下页</a></li><li class="paginate_button last" id="lendingList_last"><a href="javascript:void(0);" aria-controls="lendingList" data-dt-idx="10" tabindex="0">末页</a></li></ul></div><div class="clear"></div></div></div>
    </div>
    <!--正文内容end-->
</div>

<script src="jedate/jedate.min.js"></script>

<script>
    jeDate({
        dateCell:"#refundDate", //目标元素。由于jedate.js封装了一个轻量级的选择器，因此dateCell还允许你传入class、tag这种方式 '#id .class'
        format:"YYYY-MM-DD", //日期格式
        minDate:"1900-01-01", //最小日期
        maxDate:"2099-12-31", //最大日期
        isinitVal:false, //是否初始化时间
        isTime:true, //是否开启时间选择
        isClear:true, //是否显示清空
        festival:false, //是否显示节日
        zIndex:999,  //弹出层的层级高度
        marks:null, //给日期做标注
        choosefun:function(val) {},  //选中日期后的回调
        clearfun:function(val) {},   //清除日期后的回调
        okfun:function(val) {}       //点击确定后的回调
    });
</script>

<script>
    var dt;
    function refresh(){
        dt.api(dt.api().page()).draw(false);
    }
    $(function(){
        $("body").delegate('#repaymentCardNo',"keyup",function(){
            this.value =this.value.replace(/\s/g,'').replace(/(\d{4})(?=\d)/g,"$1 ");
        });

        dt = $("#lendingList").dataTable({
            "sDom":'<"top"<"clear">>rt<"bottom"ilp<"clear">>',
            bProcessing:true,
            pageLength: 10,
            searching: false, // 禁用dataTables自带的查询框
            ordering: false, // 禁用排序
            ajax: {
                type: "POST",
                url: "/hd/refund/getRefundOrEarlyClearanceList",
                data:function(d) {
                     d.hdCustInfoId = $("#hdCustInfoId").val();
                     d.hdCustInfoName = $("#hdCustInfoName").val();
                     d.refundDate = $("#refundDate").val();
                     d.capitalId = $("#capitalId").val();
                     d.bizName=$("#bizName").val();
                     d.settleType = $("#settleType").val();
                     d.status = $("#status").val();
                }
            },
            columns: [
                {data:"capitalName"},
                {data:"bizName"},
                {data:"hdCustInfoName"},
                {data:"hdCustInfoIdNo"},
                {data:"applyAmount"},
                {data:"bussinessRate"},
                {data:"capitalRate"},
                {data:"plantAmt"},
                {data:"capitalAmt"},
                {data:"settleType", render: function(data, type, row) {
                        if(1 == data){
                            return "退货";
                        }else if(2 == data){
                            return "提前结清";
                        }
                        return data;
                    }},
                {data:"status", render: function(data, type, row) {
                        if(1 == data){
                            return "处理中";
                        }else if(2 == data){
                            return "已处理";
                        }else if(3 == data){
                            return "处理中";
                        }else if(4 == data){
                            return "已处理";
                        }
                        
                        return data;
                    }},
                {data:"settleDate"},
                {data: "hdLoanInfoId",render:function(data,type,row){
                        var operation =  "<button type='button' name='detail' id='detail' data-hdLoanInfoId="+row.hdLoanInfoId+" data-settleType="+row.settleType+" class='btn btn-primary btn-sm 'style='margin-bottom: 5px' name='log-detail' >明细</button>";
                        return operation;
                    }}
            ]

        });
        $("#lendingList").on("click","button[name='detail']",function(e){
            var hdLoanInfoId = $(this).attr("data-hdLoanInfoId");
            var settleType = $(this).attr("data-settleType");
            if('1'==settleType){
                $.ajax({
                    type: 'POST',
                    url: "/hd/refund/getRefundOrEarlyClearanceDetail" ,
                    data:{hdLoanInfoId:hdLoanInfoId} ,
                    async: true,
                    success:function(data) {
                        if ('200' == data.code) {
                            var initButton = "<table id=\"lendingList\" style=\"width: 100%;\" class=\"table table-bordered table-striped table-hover bg_wt\">" +
                                "<p class='fixP mt_15'>平台应收</p>" +
                                "<thead style=\"border-bottom: 0;background-color: #fff;\">" +
                                "<tr>" +
                                "<th class=\"text-center fs_13\">占用期</th>" +
                                "<th class=\"text-center fs_13\">剩余本金</th>" +
                                "<th class=\"text-center fs_13\">逾期期数</th>" +
                                "<th class=\"text-center fs_13\">逾期天数</th>" +
                                "<th class=\"text-center fs_13\">违约金</th>" +
                                "<th class=\"text-center fs_13\">罚息</th>" +
                                "<th class=\"text-center fs_13\">提前手续费</th>" +
                                "<th class=\"text-center fs_13\">应退贴息 </th>" +
                                "<th class=\"text-center fs_13\">合计</th>" +
                                "</tr>" +
                                "</thead>" +
                                "<tbody>" +
                                "<tr>" +
                                "<td class=\"text-center fs_13\">" + data.result.hdOccupyPerdNo + "</td>" +
                                "<td class=\"text-center fs_13\">" + data.result.plantWb + "</td>" +
                                "<td class=\"text-center fs_13\">" + data.result.hdLoanOverduePeriods + "</td>" +
                                "<td class=\"text-center fs_13\">" + data.result.hdLoanOverdueDates + "</td>" +
                                "<td class=\"text-center fs_13\">" + data.result.falseAmt + "</td>" +
                                "<td class=\"text-center fs_13\">" + data.result.plantFx + "</td>" +
                                "<td class=\"text-center fs_13\">" + data.result.plantSxf + " </td>" +
                                "<td class=\"text-center fs_13\">" + data.result.refundInterestDiscount + "</td>" +
                                "<td class=\"text-center fs_13\">" + data.result.plantAmt + "</td>" +
                                "</tr>" +
                                "</tbody>" +
                                "</table>" +
                                "<p class='fixP mt_15'>资方应收</p>" +
                                "<table id=\"lendingList\" style=\"width: 100%;\" class=\"table table-bordered table-striped table-hover bg_wt\">" +
                                "<thead style=\"border-bottom: 0;background-color: #fff;\">" +
                                "<tr>" +
                                "<th class=\"text-center fs_13\">占用期</th>" +
                                "<th class=\"text-center fs_13\">剩余本金</th>" +
                                "<th class=\"text-center fs_13\">提前手续费</th>" +
                                "<th class=\"text-center fs_13\">应退贴息 </th>" +
                                "<th class=\"text-center fs_13\">结清应还利息</th>" +
                                "<th class=\"text-center fs_13\">合计</th>" +
                                "</tr>" +
                                "</thead>" +
                                "<tbody>" +
                                "<tr>" +
                                "<td class=\"text-center fs_13\">" + data.result.cpOccupyPerdNo + "</td>" +
                                "<td class=\"text-center fs_13\">" + data.result.capitalWb + "</td>" +
                                "<td class=\"text-center fs_13\">" + data.result.capitalSxf + " </td>" +
                                "<td class=\"text-center fs_13\">" + data.result.payInterestDiscount + "</td>" +
                                "<td class=\"text-center fs_13\">" + data.result.capitalSxf + "</td>" +
                                "<td class=\"text-center fs_13\">" + data.result.capitalAmt + "</td>" +
                                "</tr>" +
                                "</tbody>" +
                                "</table>";
                            layer.open({
                                type: 1,
                                area: ['1280px', '600px'],
                                title: '退货明细',
                                shadeClose: true, //点击遮罩关闭
                                content: initButton
                            });
                        }else {
                            layer.msg(data.msg);
                        }
                    }
                });
            }else if('2'==settleType){
                $.ajax({
                    type: 'POST',
                    url: "/hd/refund/getRefundOrEarlyClearanceDetail" ,
                    data:{hdLoanInfoId:hdLoanInfoId} ,
                    async: true,
                    success:function(data) {
                        if ('200' == data.code) {
                            var initButton = "<p class='fixP mt_15'>平台应收</p>" +
                                "<table id=\"lendingList\" style=\"width: 100%;\" class=\"table table-bordered table-striped table-hover bg_wt\">" +
                                "<thead style=\"border-bottom: 0;background-color: #fff;\">" +
                                "<tr>" +
                                "<th class=\"text-center fs_13\">剩余本金</th>" +
                                "<th class=\"text-center fs_13\">逾期期数</th>" +
                                "<th class=\"text-center fs_13\">逾期天数</th>" +
                                "<th class=\"text-center fs_13\">违约金</th>" +
                                "<th class=\"text-center fs_13\">罚息</th>" +
                                "<th class=\"text-center fs_13\">提前手续费 </th>" +
                                "<th class=\"text-center fs_13\">合计</th>" +
                                "</tr>" +
                                "</thead>" +
                                "<tbody>" +
                                "<tr>" +
                                "<td class=\"text-center fs_13\">" + data.result.plantWb + "</td>" +
                                "<td class=\"text-center fs_13\">" + data.result.hdLoanOverduePeriods + "</td>" +
                                "<td class=\"text-center fs_13\">" + data.result.hdLoanOverdueDates + "</td>" +
                                "<td class=\"text-center fs_13\">" + data.result.falseAmt + "</td>" +
                                "<td class=\"text-center fs_13\">" + data.result.plantFx + "</td>" +
                                "<td class=\"text-center fs_13\">" + data.result.plantSxf + "</td>" +
                                "<td class=\"text-center fs_13\">" + data.result.plantAmt + "</td>" +
                                "</tr>" +
                                "</tbody>" +
                                "</table>" +
                                "<p class='fixP mt_15'>资方应收</p>" +
                                "<table id=\"lendingList\" style=\"width: 100%;\" class=\"table table-bordered table-striped table-hover bg_wt\">" +
                                "<thead style=\"border-bottom: 0;background-color: #fff;\">" +
                                "<tr>" +
                                "<th class=\"text-center fs_13\">占用期</th>" +
                                "<th class=\"text-center fs_13\">剩余本金</th>" +
                                "<th class=\"text-center fs_13\">提前手续费 </th>" +
                                "<th class=\"text-center fs_13\">结清应收利息 </th>" +
                                "<th class=\"text-center fs_13\">合计</th>" +
                                "</tr>" +
                                "</thead>" +
                                "<tbody>" +
                                "<tr>" +
                                "<td class=\"text-center fs_13\">" + data.result.cpOccupyPerdNo + "</td>" +
                                "<td class=\"text-center fs_13\">" + data.result.capitalWb + "</td>" +
                                "<td class=\"text-center fs_13\">" + data.result.capitalSxf + "</td>" +
                                "<td class=\"text-center fs_13\">" + data.result.capitalSxf + "</td>" +
                                "<td class=\"text-center fs_13\">" + data.result.capitalAmt + "</td>" +
                                "</tr>" +
                                "</tbody>" +
                                "</table>";
                            layer.open({
                                type: 1,
                                area: ['1280px', '600px'],
                                title: '提前结清明细',
                                shadeClose: true, //点击遮罩关闭
                                content: initButton
                            });
                        }else{
                            layer.msg(data.msg);
                        }
                    }
                });

            }

        });
    });

    function exportResult(){
        layer.confirm("确定要导出结果到excel中吗？", {
            btn: ['确认','取消'], //按钮
            yes:function (index, layero) {
                var hdCustInfoId ="";
                var hdCustInfoName = "";
                var refundDate = "";
                var capitalId = "";
                var bizName = "";
                var settleType = "";
                var status = "";

                hdCustInfoId = $("#hdCustInfoId").val();
                hdCustInfoName = $("#hdCustInfoName").val();
                refundDate = $("#refundDate").val();
                capitalId = $("#capitalId").val();
                bizName=$("#bizName").val();
                settleType = $("#settleType").val();
                status = $("#status").val();
               var url="/hd/refund/refundOrEarlyClearancedExport?hdCustInfoId="+hdCustInfoId+"&hdCustInfoName="+hdCustInfoName+"&refundDate="+refundDate+"&capitalId="+capitalId
                    + "&bizName=" + bizName + "&settleType=" + settleType + "&status=" + status;
                window.open(url);
                layer.close(index);
            },
            cancel:function(index){
                //按钮【按钮二】的回调
                layer.close(index);
            },
        });
    }

    $("#btn-search").click(function(e){
        var hdCustInfoId ="";
        var hdCustInfoName = "";
        var refundDate = "";
        var capitalId = "";
        var bizName = "";
        var settleType = "";
        var status = "";

        hdCustInfoId = $("#hdCustInfoId").val();
        hdCustInfoName = $("#hdCustInfoName").val();
        refundDate = $("#refundDate").val();
        capitalId = $("#capitalId").val();
        bizName=$("#bizName").val();
        settleType = $("#settleType").val();
        status = $("#status").val();
        dt.api().draw();
    });
</script>


<script>
    //分页方法
    function page(n,s){
        $("#pageNo").val(n);
        $("#pageSize").val(s);
        $("#searchForm").submit();
        return false;
    }


</script>

<script>
    var time = 100000;
    var interval; //调度器对象。
    function run(){
        interval = setInterval("fun()",time);
    }
    function fun(){
        $(".hui").css("display","none");
    }
    $(function(){
        $("#reviewList").delegate('tr td button','click',function(){
            $(this).html("加载中...").attr("disabled","disabled");
            $(".hui").css("display","block");
            run();
        })
    })
</script>

<script>
    $(document).ready(function(e) {
        var counter = 0;
        if (window.history && window.history.pushState) {
            $(window).on('popstate', function () {
                window.history.pushState('forward', null, '#');
                window.history.forward(1);
            });
        }
        window.history.pushState('forward', null, '#'); //在IE中必须得有这两行
        window.history.forward(1);
    });
</script>

</div>